]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Change to $HOME before launching gnome-panel again
authorOwen W. Taylor <otaylor@fishsoup.net>
Sat, 8 Aug 2009 14:44:22 +0000 (10:44 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Sat, 8 Aug 2009 16:51:01 +0000 (12:51 -0400)
When exiting from --replace mode, we want to start the new
gnome-panel with a reasonable working directory so that if, you say,
open a terminal from it it doesn't start off in the gnome-shell
directory.

(gnome-shell itself is running in $HOME because mutter changes
directory itself at startup.)

Reported by Mathieu Bridon
http://bugzilla.gnome.org/show_bug.cgi?id=591145

src/gnome-shell.in

index 12a607f978c278cdc37887c3854c1e33e11255fd..ebb0f3957bb560bcd3c154f6f6f67a4e975dd6c7 100644 (file)
@@ -301,6 +301,11 @@ finally:
 
     if not run_in_xephyr:
         # Restart gnome-panel and window manager
+
+        # We don't want to start the new gnome-panel in the current
+        # directory; $HOME is better for stuff launched from it
+        os.chdir(os.path.expanduser("~"))
+
         if metacity_pid:
             if options.verbose:
                 print "Restarting Metacity"